package com.jiantong.version.enums;

/**
 * Created by niufei on 2017/4/26.
 *
 */
public enum InstallationPackageType {

    ANDROID(1,"安卓"),
    IOS(2,"苹果");

    private final Integer value;
    private final String description;

    InstallationPackageType(Integer value, String description){
        this.value = value;
        this.description = description;
    }

    public static InstallationPackageType from(Integer value) {
        for (InstallationPackageType installationPackageType : InstallationPackageType.values()) {
            if (installationPackageType.value.equals(value)) {
                return installationPackageType;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
